#ifndef AJANLAT_H
#define AJANLAT_H

#include <QDialog>
#include "QSqlRelationalTableModel"
#include <QTableView>
#include <QDataWidgetMapper>
#include <QtSql>
#include <ccommon.h>

namespace Ui {
    class Cajanlat;
}

class Cajanlat : public QDialog
{
    Q_OBJECT
    
private:
    int ujsor;
    int row;
public:
    explicit Cajanlat(QWidget *parent = 0);
    ~Cajanlat();
    
private slots:

    void on_pushButton_2_clicked();

    void on_pushButton_clicked();

    void on_pushButton_4_clicked();

    void on_pushButton_5_clicked();

    void on_pushButton_3_clicked();

    void on_pushButton_6_clicked();

public slots:
    void setCurrentModelIndex(QModelIndex);

private:
    enum {
        id = 0,
        megbizo_oszlop = 1,
        megnevezes = 2,
        dateon=3,
        dateoff=4,
        szerzodes=5
    };
    Ui::Cajanlat *ui;
    QDataWidgetMapper *mapper;
    QSqlRelationalTableModel *tableModel;
    QSqlRelationalTableModel *model_4;
    void SubmitData();
};

#endif // AJANLAT_H
